import { ApiCallWs } from "tsrpc";
import { roomServer } from "../..";
import { ReqJoinRoom, ResJoinRoom } from "../../shared/protocols/room/PtlJoinRoom";


export async function ApiJoinRoom(call: ApiCallWs<ReqJoinRoom, ResJoinRoom>) {
    let state = roomServer.join(call.conn, call.req.roomId)

    call.succ({
        ...state
    });
}